<?php
/**
 * The Sidebar containing the primary and secondary widget areas.
 *
 * @package WordPress
 * @subpackage ceyloan
 * @since ceyloan 1.0
 */
?>
<div id="right-column">
<?php if(!dynamic_sidebar( 'primary-widget-area' )): ?>		
				<div id="right-column">
					<div class='widget-area'>
						<h2 class='widget-title'>Search</h2>
						<ul>
							<?php get_search_form(); ?>
						</ul>
					</div>
					<div class='widget-area'>
						<h2 class='widget-title'>Category list</h2>
						<ul>
						<?php $categories=get_categories();
						$category;
							foreach($categories as $category){
						?>
							<li><a href="<?php echo get_category_link($category) ?>"><?php echo $category->name ?></a></li>
						<?php } ?>
						</ul>
					</div>
					<div class='widget-area'>
						<h2 class='widget-title'>Archive</h2>
						<ul>
							<?php wp_get_archives( array( 'type' => 'monthly' ) ); ?>
						</ul>
					</div>
					<div class='widget-area'>
						<?php the_widget( 'WP_Widget_Recent_Posts', array( 'number' => 10 ), array( 'widget_id' => '404' ,'before_title'=>'<h2 class="widget-title">','after_title'=>'</h2>') ); ?>
					</div>
				</div>			
<?php endif; ?>
</div>